// index.js
Page({
  data :{
    iconImgs :[
      {icon: '1',incident: '待办'},
      {icon: '2',incident: '待阅'},
      {icon: '3',incident: '已办'},
      {icon: '4',incident: '已阅'},
      {icon: '5',incident: '系统'}
    ],
    delArticle :[
      {id: '1',headLine1: '教职工请假申请',content1: '工作部门:系统维护 请假申请人:xxx',footer1: '昨天',icon: '6'}
    ]
  },
  handleTouchMove(e) {
    const { clientX, startX, index } = e.currentTarget.dataset;
    const moveX = clientX - startX;
    if (moveX < -50) {
      // 滑动距离达到阈值，执行删除操作
      this.deleteMessage(index);
    }
  },
  handleTouchEnd() {
    // 处理触摸结束的逻辑，如果有需要的话
  },
  deleteMessage(index) {
    // 根据索引删除消息的逻辑
    // 例如：this.data.delArticle.splice(index, 1);
    // 更新数据：this.setData({ delArticle: this.data.delArticle });
  },
})
